﻿using System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;

namespace XNAGraffiti.ParticleSystems
{
    class LargeSparkParticleSystem : ParticleSystem
    {
        public LargeSparkParticleSystem(Game game, ContentManager content)
            : base(game, content)
        { }


        protected override void InitializeSettings(ParticleSettings settings)
        {
            settings.TextureName = "fire";

            settings.MaxParticles = 1000;

            settings.Duration = TimeSpan.FromSeconds(2);

            settings.DurationRandomness = 3;
            settings.MinHorizontalVelocity = 3;
            settings.MaxHorizontalVelocity = 15;

            settings.MinVerticalVelocity = 20;
            settings.MaxVerticalVelocity = 40;

            settings.Gravity = new Vector3(-3, -85, 0);

            settings.EndVelocity = 0.75f;

            settings.MinRotateSpeed = -1;
            settings.MaxRotateSpeed = 1;


            settings.MinColor = new Color(10, 10, 10, 10);
            settings.MaxColor = new Color(255, 255, 255, 50);
            settings.MinRotateSpeed = -1;
            settings.MaxRotateSpeed = 1;
            settings.EmitterVelocitySensitivity = 14;

            settings.MinStartSize = 1f;
            settings.MaxStartSize = 1.5f;

            settings.MinEndSize = 1;
            settings.MaxEndSize = 1f;

            // Use additive blending.
            settings.SourceBlend = Blend.SourceAlpha;
            settings.DestinationBlend = Blend.One;
        }
    }
}
